/**
 * Created by hp on 2017/4/26.
 */
// process.env.DEV_API_URL
// 全站的券包bag id
const couponBagId = '16'

let config = {
    WXAPPID: 'wx14b5c52fc6734a9c',
    WXWEBAPPID: 'wx7e1cda3610d49884',
    WBWEBAPPID: '2828365896',
    ALIPAYAPPID: '2016081500252312',
    BASE_URL: 'http://dbg.weike.fm:8010',
    MAIN_URL: 'http://localhost:3000',
    WARNING_URL: 'http://localhost:3001',
    REDIRECT_WARN: false,
    DEBUG: true,
    COUPON_BAG_ID: couponBagId,
}

if (process.env.NODE_ENV === 'production') {
    config = {
        WXAPPID: 'wx3502aeb0c3639966',
        WXWEBAPPID: 'wx7e1cda3610d49884',
        WBWEBAPPID: '2828365896',
        ALIPAYAPPID: '2017081508206734',
        BASE_URL: 'https://m.weike.fm',
        MAIN_URL: 'https://m.weike.fm',
        WARNING_URL: 'http://weike.eva2.cn',
        REDIRECT_WARN: false,
        DEBUG: false,
        COUPON_BAG_ID: couponBagId,
    }
}

if (window.location.host === 'dbg.weike.fm') {
    config = {
        WXAPPID: 'wx14b5c52fc6734a9c',
        WXWEBAPPID: 'wx7e1cda3610d49884',
        WBWEBAPPID: '2828365896',
        ALIPAYAPPID: '2016081500252312',
        BASE_URL: 'http://dbg.weike.fm:80',
        MAIN_URL: 'http://dbg.weike.fm',
        WARNING_URL: 'http://weike.eva2.cn',
        REDIRECT_WARN: false,
        DEBUG: false,
        COUPON_BAG_ID: couponBagId,
    }
}

if (window.localStorage.getItem('env') === 'mock' && process.env.NODE_ENV !== 'production') {
    config = {
        WXAPPID: 'wx14b5c52fc6734a9c',
        WXWEBAPPID: 'wx7e1cda3610d49884',
        WBWEBAPPID: '2828365896',
        ALIPAYAPPID: '2016081500252312',
        BASE_URL: 'https://easy-mock.com/mock/59f3028b787bd45156a0b944',
        MAIN_URL: 'http://dbg.weike.fm:8020',
        WARNING_URL: 'http://weike.eva2.cn',
        REDIRECT_WARN: false,
        DEBUG: false
    }
}

export default config

